CC=g++
CFLAGS=-c -Wall
LDFLAGS=
SOURCES=main_inst.cpp L1_data_cache.cpp L1_instruction_cache.cpp L2_cache.cpp util.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=test


all: $(SOURCES) $(EXECUTABLE)

debug: CC += -DDEBUG -g
debug: all
	
$(EXECUTABLE): $(OBJECTS) 
	$(CC) $(LDFLAGS) $(OBJECTS) -o $@

.cpp.o:
	$(CC) $(CFLAGS) $< -o $@

clean: 
	rm -rf *.o
